package guida.ccf.gzuexaminesystem.exception;

import guida.ccf.gzuexaminesystem.common.HttpStatus;
import lombok.Getter;

@Getter
public class CustomLoginException extends RuntimeException {

    /**
     *  自定义异常
     */
    private final Integer code;

    public CustomLoginException() {
        super("用户未登录或登录信息已过期.");
        this.code = HttpStatus.REDIRECT;
    }

    public CustomLoginException(String msg) {
        super(msg);
        this.code = HttpStatus.UNAUTHORIZED;
    }
}
